{% extends 'base.html' %}

{% block pageTitle %}{{ company.name }}{% endblock %}

{% block pageContent %}
	<h1 class="company-name">{{ company.name }}</h1>

	<div class="section section-atAGlance">
		<a
			href="{{ company.websiteUrl }}"
			target="_blank"
			rel="noopener noreferrer"
		>
			{{ company.websiteText }}
			<img style="vertical-align: text-top;" src="/assets/external-link.svg" width="16px" height="16px">
		</a>
		{% if company.shortRegion %}
			<span role="separator"></span>
			{{ company.shortRegion }}
		{% endif %}
	</div>

	{% for headingProperty, headingText in headingPropertyNames %}
		{% if company.profileContent[ headingProperty ] %}
			<div class="section section-{{ headingProperty }}">
				<h2>{{ headingText }}</h2>
				{{ company.profileContent[ headingProperty ]|safe }}
			</div>
		{% endif %}
	{% endfor %}

	{# There are different "levels" of incomplete - if company.isIncomplete is
	 # true then this profile is "really" incomplete, with a warning icon and
	 # everything, so there is no point in showing this section.
	 #}
	{% if missingHeadings.length and ! company.isIncomplete %}
		<div class="section section-missingInfo">
			<h2>Missing info</h2>
			<p>
				We're missing some information about this company!  Here's what
				else we need:
			</p>
			<ul>
				{% for headingProperty in missingHeadings %}
					<li>{{ headingPropertyNames[ headingProperty ] }}</li>
				{% endfor %}
			</ul>
			<p>
				<strong>Want to help?</strong>
				<a href="{{ editUrl }}" target="_blank" rel="noopener noreferrer">
					Send us a pull request on GitHub <span style="vertical-align: text-top;"> <img src="/assets/external-link.svg" /> </span>
				</a>
				with your changes to this file!
			</p>
		</div>
	{% endif %}
{% endblock %}

